#define cmsLayout() 
	#if(isPjax) 
		#@cmsContent?() 
	#else 
		#@cmsPageLayout?()
	#end 
#end 

#define cmsPageLayout()
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>#(SiteInfo.siteName)</title>
	<link rel="icon" href="#(ctx)/static/cms/img/cms.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="#(ctx)/static/cms/img/cms.ico" />
	<link rel="Bookmark" href="#(ctx)/static/cms/img/cms.ico" />
	<link rel="stylesheet" href="#(ctx)/static/common/layui/css/layui.css">
	<link rel="stylesheet" href="#(ctx)/static/cms/css/nprogress.css">
	<link rel="stylesheet" href="#(ctx)/static/cms/css/cms.css">
	<script src="#(ctx)/static/common/layui/layui.js"></script>
	<script src="#(ctx)/static/cms/js/jquery.js"></script>
	<script src="#(ctx)/static/cms/js/jquery.pjax.js"></script>
	<script src="#(ctx)/static/cms/js/nprogress.js"></script>
	<script src="#(ctx)/static/common/wangEditor4/wangEditor.min.js"></script>
	<script src="#(ctx)/static/cms/js/cms.js"></script>
</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo">#cutStr(SiteInfo.siteName,10)</div>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item">
					<a href="javascript:;">#(session.account.nickName??)</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="#(ctx)/cmsAccount/enterPwdEdit">修改密码</a>
						</dd>
					</dl>
				</li>
				<li class="layui-nav-item"><a href="#(ctx)/cmsLogin/logOut">退出</a></li>
			</ul>
		</div>

		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				###建议使用绝对路径引用，使用相对路径引用时打成fatjar会报错，找不到模板
				#include("/cms/common/navTree.html")
			</div>
		</div>

		<div id="rightMain" class="layui-body">
			<!-- 内容主体区域 -->
			#@cmsContent()
		</div>
	</div>
</body>
</html>

#end

###layui中需要动态渲染的内容 
#define jsInit()
<script>
	//JavaScript代码区域
	var element = layui.element;
	element.render();//对垂直导航、面包屑进行刷新，解决不显示的问题

	var form = layui.form;
	form.render();

	var layer = layui.layer;
	var tree = layui.tree;
</script>
<script type="text/javascript">
	//使用pjax
	$(document).pjax(".pjax-a", '#rightMain', {
		timeout : 20000
	});
	//使用加载条
	$(document).on("pjax:start", NProgress.start).on("pjax:end", NProgress.done);
</script>
#end